#include<bits/stdc++.h>
using namespace std;
#include<string.h>
#include<string>
int main(){
    string str;
    cin>>str;

    // int first = stoi(str.substr(0,1));//取出首位
    // int second = stoi(str.substr(2,3));
    // int third = stoi(str.substr(6,5));
    // int end = stoi(str.substr(12));//标识位
    // //cout<<first<<":"<<second<<":"<<third<<":"<<end<<endl;

    // int sum = 0;
    // sum += first * 1;
    // sum += second * 24;
    // sum += third * 15120;
    // sum %= 11;
    // string ret;
    int sum = 0;
    int cnt = 1;
    for(int i = 0;i<12;i++){
        if(str[i] == '-'){
            continue;
        }

        sum += (str[i]-'0')*cnt;
       // cout<<sum<<endl;

        cnt++;
    }
   // cout<<sum<<endl;
    sum %=11;
    if(sum == str[12]-'0' || (sum == 10 && str[12] == 'X')){
        cout<<"Right"<<endl;
    }else{
        if(sum == 10){
            str[12] = 'X';
        }else{
            str[12] = sum+'0';      
        }
        cout<<str<<endl;
      
    }

    return 0;
}